from gym.envs.registration import registry, register, make, spec
from itertools import product

sizes = [7, 8]
players = [2]
coop = [True, False]
foods = [3, 4]
r_ids = list(range(30))
for s, p, f, c, r_id in product(sizes, players, foods, coop, r_ids):
    register(
        id="Foraging-{0}x{0}-{1}p-{2}f{3}-r{4}-v1".format(s, p, f, "-coop" if c else "", r_id),
        entry_point="lbforaging.foraging:ForagingEnv",
        kwargs={
            "players": p,
            "max_player_level": 3,
            "field_size": (s, s),
            "max_food": f,
            "sight": s,
            "max_episode_steps": 500,
            "force_coop": c,
            "additional_reward_id": r_id,
        },
    )
